﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EntityComponentSystem.Framework;
using EntityComponentSystem.Framework.Systems;

namespace ECS.Demos.Tetris.Systems
{
    public interface IBlockCollisionSystem : ISystem
    {
        bool Collide(int entity);
    }

    public class BlockCollisionSystem : ISystem
    {

        //private ColorEx[,] blockgrid = null;

        public string Name
        {
            get { return "blockcollision"; }
        }

        public void Update(GameEngine ge)
        {
            //if (blockgrid == null)
            //{
            //    var frame = ge.GetEntityByTag("blockframe");
            //    var position = ge.GetComponent(frame, "position");
            //    var size = ge.GetComponent(frame, "size");

            //    int x = position["x"];
            //    int y = position["y"];
            //    int w = size["w"];
            //    int h = size["h"];

            //    blockgrid = new ColorEx[w, h];
            //}
        }

        public void Init(GameEngine ge)
        {

        }

        public bool Collide(int entity)
        {
            return false;
        }

    }

}
